﻿<%@ Page Title="" Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true"
    CodeFile="MyBookmarks.aspx.cs" Inherits="MyBookmarks" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
    <asp:Label ID="LUserName" runat="server" Text="" Visible=true></asp:Label>
    <asp:LoginView ID="LoginView1" runat="server">
        <AnonymousTemplate>
        Aceasta pagina poate fi vizionata doar de utilizatorii inregistrati. Pentru a va inregistra accesati acest link:
        </AnonymousTemplate>
        <LoggedInTemplate><br />
        <center><a href="AddBookmark.aspx">Creaza un nou bookmark</a> </center>
            <asp:Repeater ID="listare_list" runat="server" DataSourceID="SqlDataSource1">
                <HeaderTemplate>
                    <ul>
                </HeaderTemplate>
                <ItemTemplate>
                    <li>
                        <div id="T1">
                            <asp:HyperLink ID="HyperLink1" runat="server" NavigateUrl='<%# Eval("Link", "Http://{0}") %>'>
                                <%# Eval("Titlu")%>
                            </asp:HyperLink>
                        </div>
                        <asp:HyperLink ID="HyperLink2" runat="server" NavigateUrl='<%# Eval("Index", "~/LinqDetailedBookmark.aspx?id={0}") %>'>
                            More Details 
                        </asp:HyperLink>
                        (<%# Eval("Descriere") %>) 
                   </li>
                </ItemTemplate>
                <FooterTemplate>
                    </ul>
                </FooterTemplate>
            </asp:Repeater>
        </LoggedInTemplate>
    </asp:LoginView>
    <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:ConStrDinTren %>"
                SelectCommand="SELECT * FROM [Bookmark] join aspnet_Users on owner = UserId WHERE ([UserName] = @Owner)">
        <SelectParameters>
            <asp:ControlParameter ControlID="LUserName" Name="Owner" PropertyName="Text" Type="Object" />
        </SelectParameters>
    </asp:SqlDataSource>
</asp:Content>
